package com.example.demo.repository;

import com.example.demo.bean.GroupMessageBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

public interface GroupMessageRepository extends JpaRepository<GroupMessageBean, String> {

    @Query(value = "SELECT * FROM t_groupmessage WHERE group_name = ?1",
            nativeQuery = true)
    public List<Map<String, Object>> findGroupMessage(String groupName);
}
